package config

type Mysql struct {
	GeneralDB `yaml:",inline" mapstructure:",squash"`
}

func (m *Mysql) Dsn() string {
	// return "hft:HCYzPsjijA4rFRpZ@tcp(175.178.172.97:3306)/hft?charset=utf8mb4&parseTime=True&loc=Local"
	return m.Username + ":" + m.Password + "@tcp(" + m.Path + ":" + m.Port + ")/" + m.Dbname + "?" + "parseTime=true" + "&loc=Local"
}

func (m *Mysql) GetLogMode() string {
	return m.LogMode
}
